<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <!-- 引入 echarts.js -->
    <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
</head>
<body>

<!-- 为ECharts准备一个具备大小（宽高）的Dom -->
<div id="main" style="width: 600px;height:400px;"></div>
<script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));

    // 指定图表的配置项和数据
    var option = {
        series : [
            {
                name: '访问来源',
                type: 'pie',
                radius: '55%',
                data:(function () {

                    var datas = [];
                    $.ajax({
                        type:"POST",
                        url:"/project",
                        dataType:"json",
                        async:false,
                        success:function (result) {

                            for (var i = 0; i < result.length; i++){
                                datas.push({
                                    "value":result[i].nums, "name":result[i].productName
                                })
                            }

                        }
                    })
                    return datas;

                })(),
                roseType: 'angle',
                itemStyle: {
                    normal: {
                        shadowBlur: 200,
                        shadowColor: 'rgba(0, 0, 0, 0.5)'
                    }
                }
            }
        ]
    };

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>

<blockquote class="layui-elem-quote quoteBox">
    <form class="layui-form" action="">

        <div class="layui-inline">
            <!--下拉菜单，车牌号-->
            <select id="vehiclenum" name="">
                <option value="0">请选择车牌号</option>
            </select>
        </div>
        <div class="layui-inline">
            <button type="button" class="layui-btn searchBtn">
                搜索
            </button>
        </div>

    </form>


</blockquote>
</body>
</html>